﻿function Guru_ASPNet_CatchEnterOnTextBox(e, defaultButtonID) {
    if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
        if (defaultButtonID != '') {
            var button = $('#' + defaultButtonID);
            if (button != null) {
                button.focus();
                button.click();
                return true;
            }
        }
        return false;
    }
}
